<template>
  <div>
    <!-- 有些一级路由页面无需缓存 -->
    <keep-alive exclude="Search,SearchResult,Detail,UserEdit">
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
import { getAllChannelsAPI } from '@/api'
export default {
  async created () {
    try {
      await getAllChannelsAPI()
    } catch (err) {
      // err参数拿到的是错误对象
      // 给用户来个弹窗提示 - 程序出错

      console.dir(err)
    }
  }
}
</script>

<style >
</style>
